<?php 
//用户自动验证类
namespace app\admin\validate;
use think\Validate;

class User extends Validate{
	protected $rule=[
		'username|用户名'=>'require|min:2',
		'password|密码'=>'require|min:6|confirm:repassword',
		'email|邮箱'=> 'require'

	];

	protected $message=[
		'username.require'=>'用户名不能为空',
		'username.min'=>'用户名长度不能少于3位',
		'password.require'=>'密码不能为空',
		'password.min'=>'密码长度不能少于6位',
		'password.confirm'=>'两次密码输入不一致',
		'email.require'=>'邮箱不能为空'

	];
}

 ?>